﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Knjiga
{
    public partial class EngleskeMetricke : System.Web.UI.Page
    {
         void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var F = Request.Params["pStope"];
                var I = Request.Params["pInci"];
                Stope.Text = F;
                Inci.Text = I;
             }
             if (IsPostBack)
            {
                if (Stope.Text == "") { Stope.Text = "0"; }
               
                if (Inci.Text == "") { Inci.Text = "0"; }
            }
        }

      

        protected void Button1_Click(object sender, EventArgs e)
        {
            Single fStope = Single.Parse(Stope.Text);
            Single fInci = Single.Parse(Inci.Text);
            Double fMetri = 0.305 * fStope + 0.0254 * fInci;
            lblMetri.Text = "Visoki ste" + fMetri + "metara";
        }

    }
}